import request from '@/utils/request'

// 查询J魔方报分享列表
export function listJmfReportShared(query) {
  return request({
    url: '/shared/jmfReportShared/list',
    method: 'get',
    params: query
  })
}

// 查询J魔方报分享详细
export function getJmfReportShared(id) {
  return request({
    url: '/shared/jmfReportShared/' + id,
    method: 'get'
  })
}

// 保存J魔方报分享
export function saveJmfReportShared(data) {
  return request({
    url: '/shared/jmfReportShared/save',
    method: 'post',
    data: data
  })
}

// 删除J魔方报分享
export function delJmfReportShared(id) {
  return request({
    url: '/shared/jmfReportShared/' + id,
    method: 'delete'
  })
}

// 根据报表ID查询分享信息
export function getByReportId(reportId) {
  return request({
    url: '/shared/jmfReportShared/getByReportId',
    method: 'get',
    params: { reportId }
  })
}

// 根据分享文件夹Id获取分享信息
export function getUserBySharedDirId(dirId) {
  return request({
    url: '/shared/jmfReportShared/getUserBySharedDirId',
    method: 'get',
    params: { dirId }
  })
}

// 根据分享文件夹ID删除
export function deleteBySharedDirId(dirId) {
  return request({
    url: '/shared/jmfReportShared/deleteBySharedDirId',
    method: 'delete',
    params: { dirId }
  })
}

